//
//  HXCommandCustomCell.m
//  ZCooking
//
//  Created by 韩旭 on 16/8/29.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "HXCommandCustomCell.h"
#import "UIView+Frame.h"

@implementation HXCommandCustomCell


- (void)awakeFromNib {
    CGFloat titleTop = 40;
    CGFloat titleLeft = -30;
    CGFloat titleBottom = 0;
    CGFloat titleRight = 0;
    CGFloat imageTop = -30;
    CGFloat imageLeft = 10;
    CGFloat imageBottom = 0;
    CGFloat imageRight = 10;
    [self.searchBtn setImage:[UIImage imageNamed:@"search"] forState:UIControlStateNormal];
    self.searchBtn.imageEdgeInsets = UIEdgeInsetsMake(5, -25, -5, 0);
    [self.newsPerson setImage:[UIImage imageNamed:@"xinshourumen"] forState:UIControlStateNormal];
    self.newsPerson.titleEdgeInsets = UIEdgeInsetsMake(titleTop, titleLeft, titleBottom, titleRight);
    self.newsPerson.imageEdgeInsets = UIEdgeInsetsMake(imageTop, imageLeft, imageBottom, imageRight);
    [self.foodMade setImage:[UIImage imageNamed:@"shicaipeiliao"] forState:UIControlStateNormal];
    self.foodMade.titleEdgeInsets = UIEdgeInsetsMake(titleTop, titleLeft, titleBottom, titleRight);
    self.foodMade.imageEdgeInsets = UIEdgeInsetsMake(imageTop, imageLeft, imageBottom, imageRight);
    [self.menuBtn setImage:[UIImage imageNamed:@"changjingcaipu"] forState:UIControlStateNormal];
    self.menuBtn.titleEdgeInsets = UIEdgeInsetsMake(titleTop, titleLeft, titleBottom, titleRight);
    self.menuBtn.imageEdgeInsets = UIEdgeInsetsMake(imageTop, imageLeft, imageBottom, imageRight);
    [self.GuessLike setImage:[UIImage imageNamed:@"cainixihuan"] forState:UIControlStateNormal];
    self.GuessLike.titleEdgeInsets = UIEdgeInsetsMake(titleTop, titleLeft, titleBottom, titleRight);
    self.GuessLike.imageEdgeInsets = UIEdgeInsetsMake(imageTop, imageLeft, imageBottom, imageRight);
    [self.newsPerson addTarget:self action:@selector(pushBtn:) forControlEvents:UIControlEventTouchUpInside];
    [self.foodMade addTarget:self action:@selector(pushBtn:) forControlEvents:UIControlEventTouchUpInside];
    [self.menuBtn addTarget:self action:@selector(pushBtn:) forControlEvents:UIControlEventTouchUpInside];
    [self.GuessLike addTarget:self action:@selector(pushBtn:) forControlEvents:UIControlEventTouchUpInside];
    [self.searchBtn addTarget:self action:@selector(pushBtn:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)pushBtn:(UIButton *)btn {
    self.btnBlock(btn);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}
@end
